package dominio.xml;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

import dominio.beans.Proveedor;
import dominioSets.srv.SetListaProveedores;

public class ProveedorXML {
	static XStream xstream;
	
	static { 
		xstream = new XStream(new DomDriver());
	}
	public void pasaraXml(SetListaProveedores proveedores)
	{
		xstream.alias("Proveedor",Proveedor.class);
		
		xstream.toXML(proveedores);
	}
	public SetListaProveedores obtenerCliente()
	{
		SetListaProveedores proveedores;
		proveedores= (SetListaProveedores) xstream.fromXML("Proveedores");
		return proveedores;
	}
}
